<template>
  <div>
    <city-header></city-header>
  	<city-search></city-search>
  	<city-list :list="list"></city-list>
  </div>

</template>
<script>
import axios from 'axios'
import CityHeader from './components/Header'
import CitySearch from './components/Search'
import CityList from './components/List'
export default{
  name : 'City',
  components : {
    CityHeader,
    CitySearch,
    CityList
  },
  data(){
  	return {
  		list : ''
  	}
  },
  mounted(){
  	this.getInfo()
  },
  methods : {
  	getInfo(){
  		axios.get('./static/index.json')
  			 .then(this.getInfoSucc)
  	},
  	getInfoSucc(res){
  		this.list = res.data.data
  		//console.log()
  	}
  }
}
</script>

<style lang="stylus" scoped>

  

</style>